﻿<%@ Page Title="" Language="C#" MasterPageFile="../Examples.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DotNetSources.Web.UI.Buttons.Examples.Examples._3_MessageBox.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentDescription" runat="server">
    Scenario: <em>Click --> postback --> do you server side activity --> display message box</em>.
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentExample" runat="server">
    <asp:Button runat="server" ID="cmdSubmit" OnClick="Submit_Click" Text="Button" />
    <br />
    <br />
    <strong>ASPX code:</strong><br />
    <div class="code">&lt;asp:Button runat="server" ID="Button1" OnClick="Submit_Click" Text="Button" /&gt;</div>
    <hr />
    <strong>C# code:</strong><br />
    <div class="code">
<pre>
protected void Submit_Click(object sender, object args) {
    // do your action here... (saving data into database and so on)
    
    MessageBox.Show("Your operation was successfully completed.", DotNetSources.Web.UI.Buttons.Popup.Icon.Info);
}
</pre>
</div>
</asp:Content>
